﻿using System;
using System.Text;
using System.Drawing;
using System.Buffers;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.InteropServices;

public static partial class glDRIVE
{
    /*
    Gamma函数
    
    x：自变量值。要求x>0。
    函数返回Gamma函数值。
    */

    public static string drive_gamma(int w, int h)
    {
        int i;
        double x, y;
        StringBuilder sb = new StringBuilder();
        for (i = 1; i <= 10; i++)
        {
            x = 0.5 * i;
            y = gl.gamma(x);
            sb.AppendLine("x = " + x + "     gamma(x) = " + y + "<br>");
        }
        y = gl.gamma(1.5) * gl.gamma(2.5) / gl.gamma(4.0);
        sb.AppendLine("B(1.5,2.5) = " + y + "<br>");
        return sb.ToString();
    }
}
